DOMDomain

class DOMDomain : Domain

This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an id. This id can be used to get additional information on the Node, resolve it into the JavaScript object wrapper, etc. It is important that client receives DOM events only for the nodes that are known to the client. Backend keeps track of the nodes that were sent to the client and never sends the same node twice. It is client's responsibility to collect information about the nodes that were sent to the client.<p>Note that iframe owner elements will return corresponding document elements as their child nodes.</p>

Functions

attributeModified
Link copied to clipboard
fun attributeModified(): Flowable<AttributeModifiedEvent>
Fired when Element's attribute is modified.
attributeRemoved
Link copied to clipboard
fun attributeRemoved(): Flowable<AttributeRemovedEvent>
Fired when Element's attribute is removed.
characterDataModified
Link copied to clipboard
fun characterDataModified(): Flowable<CharacterDataModifiedEvent>
Mirrors DOMCharacterDataModified event.
childNodeCountUpdated
Link copied to clipboard
fun childNodeCountUpdated(): Flowable<ChildNodeCountUpdatedEvent>
Fired when Container's child node count has changed.
childNodeInserted
Link copied to clipboard
fun childNodeInserted(): Flowable<ChildNodeInsertedEvent>
Mirrors DOMNodeInserted event.
childNodeRemoved
Link copied to clipboard
fun childNodeRemoved(): Flowable<ChildNodeRemovedEvent>
Mirrors DOMNodeRemoved event.
collectClassNamesFromSubtree
Link copied to clipboard
Collects class names for the node with given id and all of it's child nodes.
copyTo
Link copied to clipboard
fun copyTo(input: CopyToRequest): Single<CopyToResponse>
Creates a deep copy of the specified node and places it into the target container before the given anchor.
describeNode
Link copied to clipboard
fun describeNode(input: DescribeNodeRequest): Single<DescribeNodeResponse>
Describes node given its id, does not require domain to be enabled.
description
Link copied to clipboard
fun description(): String
Returns domain description.
disable
Link copied to clipboard
fun disable(): Single<RequestResponseFrame>
Disables DOM agent for the given page.
discardSearchResults
Link copied to clipboard
fun discardSearchResults(input: DiscardSearchResultsRequest): Single<RequestResponseFrame>
Discards search results from the session with the given id.
distributedNodesUpdated
Link copied to clipboard
fun distributedNodesUpdated(): Flowable<DistributedNodesUpdatedEvent>
Called when distrubution is changed.
documentUpdated
Link copied to clipboard
fun documentUpdated(): Flowable<RawEvent>
Fired when Document has been totally updated.
enable
Link copied to clipboard
fun enable(): Single<RequestResponseFrame>
Enables DOM agent for the given page.
events
Link copied to clipboard
fun events(): Flowable<Event>
Returns flowable capturing all domains events.
fun events(filter: Predicate<Event>): Flowable<Event>
Returns flowable capturing all domains events matching predicate.
fun <T : Event> events(eventClass: Class<T>): Flowable<T>
Returns flowable capturing all domain events of a given type.
fun <T : Event> events(eventClass: Class<T>, filter: Predicate<T>): Flowable<T>
Returns flowable capturing all domain events of a given type matching predicate.
focus
Link copied to clipboard
fun focus(input: FocusRequest): Single<RequestResponseFrame>
Focuses the given element.
getAttributes
Link copied to clipboard
fun getAttributes(input: GetAttributesRequest): Single<GetAttributesResponse>
Returns attributes for the specified node.
getBoxModel
Link copied to clipboard
fun getBoxModel(input: GetBoxModelRequest): Single<GetBoxModelResponse>
Returns boxes for the given node.
getContentQuads
Link copied to clipboard
fun getContentQuads(input: GetContentQuadsRequest): Single<GetContentQuadsResponse>
Returns quads that describe node position on the page.
getDependencies
Link copied to clipboard
open override fun getDependencies(): List<Domain>
Returns list of dependant domains that should be enabled prior to enabling this domain.
getDocument
Link copied to clipboard
fun getDocument(input: GetDocumentRequest): Single<GetDocumentResponse>
Returns the root DOM node (and optionally the subtree) to the caller.
getFileInfo
Link copied to clipboard
fun getFileInfo(input: GetFileInfoRequest): Single<GetFileInfoResponse>
Returns file information for the given File wrapper.
getFlattenedDocument
Link copied to clipboard
fun getFlattenedDocument(input: GetFlattenedDocumentRequest): Single<GetFlattenedDocumentResponse>
Returns the root DOM node (and optionally the subtree) to the caller.
getFrameOwner
Link copied to clipboard
fun getFrameOwner(input: GetFrameOwnerRequest): Single<GetFrameOwnerResponse>
Returns iframe node that owns iframe with the given domain.
getNodeForLocation
Link copied to clipboard
fun getNodeForLocation(input: GetNodeForLocationRequest): Single<GetNodeForLocationResponse>
Returns node id at given location.
getNodesForSubtreeByStyle
Link copied to clipboard
Finds nodes with a given computed style in a subtree.
getNodeStackTraces
Link copied to clipboard
fun getNodeStackTraces(input: GetNodeStackTracesRequest): Single<GetNodeStackTracesResponse>
Gets stack traces associated with a Node.
getOuterHTML
Link copied to clipboard
fun getOuterHTML(input: GetOuterHTMLRequest): Single<GetOuterHTMLResponse>
Returns node's HTML markup.
getRelayoutBoundary
Link copied to clipboard
fun getRelayoutBoundary(input: GetRelayoutBoundaryRequest): Single<GetRelayoutBoundaryResponse>
Returns the id of the nearest ancestor that is a relayout boundary.
getSearchResults
Link copied to clipboard
fun getSearchResults(input: GetSearchResultsRequest): Single<GetSearchResultsResponse>
Returns search results from given fromIndex to given toIndex from the search with the given identifier.
hideHighlight
Link copied to clipboard
fun hideHighlight(): Single<RequestResponseFrame>
Hides any highlight.
highlightNode
Link copied to clipboard
fun highlightNode(): Single<RequestResponseFrame>
Highlights DOM node.
highlightRect
Link copied to clipboard
fun highlightRect(): Single<RequestResponseFrame>
Highlights given rectangle.
inlineStyleInvalidated
Link copied to clipboard
fun inlineStyleInvalidated(): Flowable<InlineStyleInvalidatedEvent>
Fired when Element's inline style is modified via a CSS property modification.
markUndoableState
Link copied to clipboard
fun markUndoableState(): Single<RequestResponseFrame>
Marks last undoable state.
moveTo
Link copied to clipboard
fun moveTo(input: MoveToRequest): Single<MoveToResponse>
Moves node into the new container, places it before the given anchor.
name
Link copied to clipboard
fun name(): String
Returns domain name.
performSearch
Link copied to clipboard
fun performSearch(input: PerformSearchRequest): Single<PerformSearchResponse>
Searches for a given string in the DOM tree.
pseudoElementAdded
Link copied to clipboard
fun pseudoElementAdded(): Flowable<PseudoElementAddedEvent>
Called when a pseudo element is added to an element.
pseudoElementRemoved
Link copied to clipboard
fun pseudoElementRemoved(): Flowable<PseudoElementRemovedEvent>
Called when a pseudo element is removed from an element.
pushNodeByPathToFrontend
Link copied to clipboard
Requests that the node is sent to the caller given its path.
pushNodesByBackendIdsToFrontend
Link copied to clipboard
Requests that a batch of nodes is sent to the caller given their backend node ids.
querySelector
Link copied to clipboard
fun querySelector(input: QuerySelectorRequest): Single<QuerySelectorResponse>
Executes querySelector on a given node.
querySelectorAll
Link copied to clipboard
fun querySelectorAll(input: QuerySelectorAllRequest): Single<QuerySelectorAllResponse>
Executes querySelectorAll on a given node.
redo
Link copied to clipboard
fun redo(): Single<RequestResponseFrame>
Re-does the last undone action.
removeAttribute
Link copied to clipboard
fun removeAttribute(input: RemoveAttributeRequest): Single<RequestResponseFrame>
Removes attribute with given name from an element with given id.
removeNode
Link copied to clipboard
fun removeNode(input: RemoveNodeRequest): Single<RequestResponseFrame>
Removes node with given id.
requestChildNodes
Link copied to clipboard
fun requestChildNodes(input: RequestChildNodesRequest): Single<RequestResponseFrame>
Requests that children of the node with given id are returned to the caller in form of setChildNodes events where not only immediate children are retrieved, but all children down to the specified depth.
requestNode
Link copied to clipboard
fun requestNode(input: RequestNodeRequest): Single<RequestNodeResponse>
Requests that the node is sent to the caller given the JavaScript node object reference.
resolveNode
Link copied to clipboard
fun resolveNode(input: ResolveNodeRequest): Single<ResolveNodeResponse>
Resolves the JavaScript node object for a given NodeId or BackendNodeId.
scrollIntoViewIfNeeded
Link copied to clipboard
fun scrollIntoViewIfNeeded(input: ScrollIntoViewIfNeededRequest): Single<RequestResponseFrame>
Scrolls the specified rect of the given node into view if not already visible.
setAttributesAsText
Link copied to clipboard
fun setAttributesAsText(input: SetAttributesAsTextRequest): Single<RequestResponseFrame>
Sets attributes on element with given id.
setAttributeValue
Link copied to clipboard
fun setAttributeValue(input: SetAttributeValueRequest): Single<RequestResponseFrame>
Sets attribute for an element with given id.
setChildNodes
Link copied to clipboard
fun setChildNodes(): Flowable<SetChildNodesEvent>
Fired when backend wants to provide client with the missing DOM structure.
setFileInputFiles
Link copied to clipboard
fun setFileInputFiles(input: SetFileInputFilesRequest): Single<RequestResponseFrame>
Sets files for the given file input element.
setInspectedNode
Link copied to clipboard
fun setInspectedNode(input: SetInspectedNodeRequest): Single<RequestResponseFrame>
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
setNodeName
Link copied to clipboard
fun setNodeName(input: SetNodeNameRequest): Single<SetNodeNameResponse>
Sets node name for a node with given id.
setNodeStackTracesEnabled
Link copied to clipboard
Sets if stack traces should be captured for Nodes.
setNodeValue
Link copied to clipboard
fun setNodeValue(input: SetNodeValueRequest): Single<RequestResponseFrame>
Sets node value for a node with given id.
setOuterHTML
Link copied to clipboard
fun setOuterHTML(input: SetOuterHTMLRequest): Single<RequestResponseFrame>
Sets node HTML markup, returns new node id.
shadowRootPopped
Link copied to clipboard
fun shadowRootPopped(): Flowable<ShadowRootPoppedEvent>
Called when shadow root is popped from the element.
shadowRootPushed
Link copied to clipboard
fun shadowRootPushed(): Flowable<ShadowRootPushedEvent>
Called when shadow root is pushed into the element.
undo
Link copied to clipboard
fun undo(): Single<RequestResponseFrame>
Undoes the last performed action.

Sources

jvm source
Link copied to clipboard